package com.webbdong.aop.agent.test.exception;

import org.apache.commons.io.output.StringBuilderWriter;
import org.springframework.util.CollectionUtils;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;

import java.io.PrintWriter;
import java.io.Writer;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @program: spring-agent
 * @description:
 * @author: zt22328 赵儒定
 * @create: 2023-05-05 13:48
 **/
public class ThrowableInfoRegistry {

   private static volatile Map<Class<? extends Throwable>, List<ThrowableInfo>> throwableInfos = new ConcurrentHashMap<>();

   public static void register(Throwable throwable) {
      Class<? extends Throwable> exClass = throwable.getClass();
      List<ThrowableInfo> list = throwableInfos.get(exClass);
      if (CollectionUtils.isEmpty(list)) {

      }

   }

}
